﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    class Clear : GameScreen
    {
        Texture2D clear;
        int score=0;
        double time=0;
        bool IsScore = false;

        public Clear(int score)
        {
            this.score = score;
            IsScore = true;
        }
        public Clear(double time)
        {
            this.time = time;
            IsScore = false;
        }

        public override void LoadContent(ContentManager content)
        {
            clear = content.Load<Texture2D>("Texture/clear");
        }

        public override void Update(Touch touch, GameTime gameTime)
        {
            foreach (GestureSample gesture in touch.Gestures)
            {
                if (gesture.GestureType == GestureType.Tap)
                {
                    Point tapLocation = new Point((int)gesture.Position.X, (int)gesture.Position.Y);

                    Map.playerPoint = Map.floors[Map.playerPoint].NextIndex;
                    screenManager.RemoveScreen(this);
                    screenManager.AddScreen(new Background());
                }
            }
        }

        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            spriteBatch.Draw(clear, new Vector2(0, 0), Color.White);
        }
    }
}
